equivariant cohomology

Borel construction: MG=(M×EG)/G=M×GEG, where the quotient is regarding a diagonal action: (e,x)(eg1,gx) (homotopic to (eg1,x)? so MG is viewed as an associated vector bundle with base BG and fibre M, not M/G!)
HG(M)=H(MG)=H(M×BG)=H(M)H(BG), if G acts freely on M, HG(M)=H(M/G) (M×EGhomotopicM).
motivation in gauge theory: eg. consider the construction of moduli space. Q: In the path integral, we integrate over all field configurations rather than classical solutions, and introduce ghosts to cancel gauge redundance (so no quotient), why still consider Thom class in equivariant cohomology?